# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Contributor: Antoine Fontaine <antoine.fontaine@epfl.ch>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=py3-peewee
pkgver=3.17.7
pkgrel=0
pkgdesc="Small, expressive ORM"
url="https://github.com/coleifer/peewee"
arch="all"
license="MIT"
makedepends="
	cython
	py3-gpep517
	py3-setuptools
	py3-wheel
	python3-dev
	sqlite-dev
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/coleifer/peewee/archive/$pkgver.tar.gz"
builddir="$srcdir/peewee-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
5952b7928432599ec2ec6d78023c762d9852e15bdc2e3411d5ea7f9618de107b2d9400d8e921047842a688b4f409d5ea4996651a74983e1ce92380e9f259151d  py3-peewee-3.17.7.tar.gz
"
